<?php if (!defined('BASEPATH')) exit ('No direct script access allowed');
class Crud_model extends CI_Model
{
	function __construct()
	{
		parent::__construct();
	}
	
	function save($table, $object)
	{
		$this->db->insert($table, $object);
	}
	
	function delete($table, $id, $primary_id)
	{
		$this->db->where($primary_id,$id);
		$this->db->delete($table);
	}
	
	function update($table, $id ,$object, $primary_id)
	{
		$this->db->where($primary_id, $id);
		$this->db->update($table, $object);
	}
}

/* End of file crud_model.php */
/* Location: ./application/models/crud_model.php */